跳到主要内容

SetControlsHighlight

Sets the highlight to the content controls from the current document.

Syntax

expression.SetControlsHighlight(r, g, b, bNone);

expression - A variable that represents a ApiDocument class.

Parameters

NameRequired/OptionalData typeDefaultDescription
rRequiredbyteRed color component value.
gRequiredbyteGreen color component value.
bRequiredbyteBlue color component value.
bNoneOptionalbooleanfalseDefines that highlight will not be set.

Returns

This method doesn't return any data.

Example

This example sets the highlight to the content controls from the document.

let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
blockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control.");
doc.AddElement(0, blockLvlSdt);
doc.SetControlsHighlight(255, 111, 61);